--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
nomadnet/examples/various/input_fields.py c134ee180a1e7c9056fc5fb809f0fa722b1ecdd3 (c134ee18) Text, 1.19 KB
T8b949e#!/usr/bin/env python3
Tff7b72import T7ee787os
Te6edf3env_string Tff7b72= Ta5d6ff"Ta5d6ff"
Tff7b72for Te6edf3e Tff7b72in Te6edf3osTff7b72.Td2a8ffenvironTb4b4b4:
Te6edf3env_string Tff7b72+Tff7b72= Ta5d6ff"Tffd700{}Ta5d6ff=Tffd700{}Tffea00\nTa5d6ff"Tff7b72.Td2a8ffformatTb4b4b4(Te6edf3eTb4b4b4, Te6edf3osTff7b72.Td2a8ffenvironTb4b4b4[Te6edf3eTb4b4b4]Tb4b4b4)
Te6edf3template Tff7b72= Ta5d6ff"""Ta5d6ff>Fields and Submitting Data
Ta5d6ffNomad Network letTa5d6ff'Ta5d6ffs you use simple input fields for submitting data to node-side applications. Submitted data, along with other session variables will be available to the node-side script / program as environment variables. This page contains a few examples.
Ta5d6ff>> Read Environment Variables
Ta5d6ff{Ta5d6ff@ENV}
Ta5d6ff>>Examples of Fields and Submissions
Ta5d6ffThe following section contains a simple set of fields, and a few different links that submit the field data in different ways.
Ta5d6ff-=
Ta5d6ffAn input field : `B444`<username`Entered data>`b
Ta5d6ffAn masked field : `B444`<!|password`Value of Field>`b
Ta5d6ffAn small field : `B444`<8|small`test>`b, and some more text.
Ta5d6ffTwo fields : `B444`<8|one`One>`b `B444`<8|two`Two>`b
Ta5d6ffThe data can be `!`[submitted`:/page/input_fields.mu`username|two]`!.
Ta5d6ffYou can `!`[submit`:/page/input_fields.mu`one|password|small]`! other fields, or just `!`[a single one`:/page/input_fields.mu`username]`!
Ta5d6ffOr simply `!`[submit them all`:/page/input_fields.mu`*]`!.
Ta5d6ff-=
Ta5d6ff"""
Tffa657printTb4b4b4(Te6edf3templateTff7b72.Td2a8ffreplaceTb4b4b4(Ta5d6ff"Ta5d6ff{Ta5d6ff@ENV}Ta5d6ff"Tb4b4b4, Te6edf3env_stringTb4b4b4)Tb4b4b4)
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────